58615dc395bfaeef64efa59ff3800d52b421c67b,cepheus-ngsi/src/test/java/com/orange/ngsi/server/NgsiBaseControllerTest.java,NgsiBaseControllerTest,missingParameterErrorNotify,#,233

Before Change


        NotifyContext notifyContext = createNotifyContextTempSensor(0);
        notifyContext.setSubscriptionId(null);

        mockMvc.perform(post("/ni/notifyContext").content(json(jsonConverter, notifyContext)).contentType(MediaType.APPLICATION_JSON))
                .andExpect(status().isOk())
                .andExpect(MockMvcResultMatchers.jsonPath("$.responseCode.code").value(CodeEnum.CODE_471.getLabel()))
                .andExpect(MockMvcResultMatchers.jsonPath("$.responseCode.reasonPhrase").value(CodeEnum.CODE_471.getShortPhrase()))

After Change


        NotifyContext notifyContext = createNotifyContextTempSensor(0);
        notifyContext.setSubscriptionId(null);

        mockMvc.perform(post("/ni/notifyContext").content(json(jsonConverter, notifyContext)).contentType(MediaType.APPLICATION_JSON).header("Host", "localhost").accept(MediaType.APPLICATION_JSON))
                .andExpect(status().isOk())
                .andExpect(MockMvcResultMatchers.jsonPath("$.responseCode.code").value(CodeEnum.CODE_471.getLabel()))
                .andExpect(MockMvcResultMatchers.jsonPath("$.responseCode.reasonPhrase").value(CodeEnum.CODE_471.getShortPhrase()))